/*
 * Copyright 2020 The Kubernetes Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import 'mixins';
@import 'common';
@import '../../PatternFly/common';

@mixin NoHorizontalPadding {
  padding-left: 0;
  padding-right: 0;
}
@include Card {
  /* to get priority over PatternFly styles */
  /* @include CardHeader {
    @include NoHorizontalPadding;
  } */
  @include CardBody {
    @include NoHorizontalPadding;
  }
  @include CardFooter {
    @include NoHorizontalPadding;
  }
}

.kui--card-footer {
  &.kui--no-padding {
    padding: 0;
    height: auto;
  }
  &.kui--inverted-color-context {
    background-color: var(--color-sidecar-header);
  }
}
body[kui-theme-style='dark'] .kui--card-footer.kui--inverted-color-context {
  background-color: var(--color-sidecar-background);
}

body[kui-theme-style] {
  @include Card {
    white-space: normal;
    font-family: var(--font-sans-serif);

    .kui--card-icon {
      width: auto;
      height: 7.43em;
    }
  }
}

/** Just in case: protect against nested Cards */
@include Card {
  @include Card {
    background: none;

    @include NoBoxShadow {
      box-shadow: none;
    }
  }
}
